<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
  <link href="//gmpg.org/xfn/11" rel="profile">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="Hugo 0.68.3" />

  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>关于git的几种常用方法 &middot; MY Blog</title>

  
  <link type="text/css" rel="stylesheet" href="/rliners_technology_blog/css/print.css" media="print">
  <link type="text/css" rel="stylesheet" href="/rliners_technology_blog/css/poole.css">
  <link type="text/css" rel="stylesheet" href="/rliners_technology_blog/css/syntax.css">
  <link type="text/css" rel="stylesheet" href="/rliners_technology_blog/css/hyde.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">


  
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
  <link rel="shortcut icon" href="/favicon.png">

  
  
</head>

  <body class="theme-base-08 ">
  <aside class="sidebar">
  <div class="container sidebar-sticky">
    <div class="sidebar-about">
      <a href="/rliners_technology_blog/"><h1>MY Blog</h1></a>
      <p class="lead">
       这里是Rliner的个人博客 
      </p>
    </div>

    <nav>
      <ul class="sidebar-nav">
        <li><a href="/rliners_technology_blog/">Home</a> </li>
        
      </ul>
    </nav>

    <p>&copy; 2020. All rights reserved. </p>
  </div>
</aside>

    <main class="content container">
    <div class="post">
  <h1>关于git的几种常用方法</h1>
  <time datetime=2020-04-06T21:53:54&#43;0800 class="post-date">Mon, Apr 6, 2020</time>
  <h3 id="git-init----初始化">git init    #初始化</h3>
<h3 id="git-pull------从远程仓库拉到本地">git pull     # 从远程仓库拉到本地</h3>
<h3 id="git-remote-add-origin--httpsgiteecomprivatecloud-1privatecloudgit----连接远程仓库">git remote add origin  <a href="https://gitee.com/privatecloud-1/privatecloud.git">https://gitee.com/privatecloud-1/privatecloud.git</a>  #  连接远程仓库</h3>
<h3 id="git-branch--查看分支">git branch  查看分支</h3>
<h3 id="git-checkout-zyj---切换分支">git checkout zyj   #切换分支</h3>
<h3 id="git-add--a-dashixun--上传文件">git add -A dashixun  #上传文件</h3>
<h3 id="git-commit--m-1231----备注">git commit -m &lsquo;1231&rsquo;   # 备注</h3>
<h3 id="git-push--提交">git push  #提交</h3>
<h3 id="git-clone--b-分支名字">git clone -b &ldquo;分支名字&rdquo;</h3>
<h3 id="清空密码">清空密码</h3>
<h3 id="git-config---system---unset-credentialhelper">git config &ndash;system &ndash;unset credential.helper</h3>
<h3 id="保存密码">保存密码</h3>
<h3 id="git-config---global-credentialhelper-store">git config &ndash;global credential.helper store</h3>
<h3 id="-备用知识点-建项目着-如果想让其他人通过输入账号密码才能上传文件-则输入如下命令---这些命令用不到">### 备用知识点 建项目着 如果想让其他人通过输入账号密码才能上传文件 则输入如下命令  ### (这些命令用不到)</h3>
<h3 id="插入如下代码使项目中的组员每次修改数据都要输入账号和密码">插入如下代码使项目中的组员每次修改数据都要输入账号和密码：</h3>
<h3 id="--git-config---global-username-username">- git config &ndash;global user.name [username]</h3>
<h3 id="--git-config---global-userpassword-userpassword">- git config &ndash;global user.password [userpassword]</h3>
<h3 id="--ps想要保存密码则需要插入如下代码-git-config-global-credentialhelper-store">- PS：想要保存密码，则需要插入如下代码： git config –global credential.helper store。</h3>
<h3 id="更多操作方式请前往下方网址出观看">更多操作方式请前往下方网址出观看</h3>
<h3 id="httpswwwcnblogscomchenhuichaop9631754html"><a href="https://www.cnblogs.com/chenhuichao/p/9631754.html">https://www.cnblogs.com/chenhuichao/p/9631754.html</a></h3>

</div>


    </main>

    
  </body>
</html>
